import {request} from '@umijs/max';
import * as API from "@/services";


/** 活动报名 分页检索请求 */
export async function queryActivityRegists(params: API.ActivityRegistPageQueryParams): Promise<API.RespPageResult<API.ActivityRegist>> {
  return request('/api/v1/activity-regist', {
    params,
  });
}

/** 活动报名 详情请求 */
export async function queryActivityRegist(bizId: API.EntityId): Promise<API.RespResult<API.ActivityRegist>> {
  return request(`/api/v1/activity-regist/${bizId}`);
}

/*

/!** 活动报名 创建请求 *!/
export async function createActivityRegist(entity: API.ActivityRegist_Create): Promise<API.RespResult<any>> {
  return request(`/api/v1/activity-regist`, {
    method: 'POST',
    data: entity,
  });
}

/!** 活动报名 修改请求 *!/
export async function modifyActivityRegist(entity: API.ActivityRegist_Modify): Promise<API.RespResult<any>> {
  return request(`/api/v1/activity-regist/${entity.id}`, {
    method: 'PUT',
    data: entity,
  });
}

/!** 活动报名 修改(部分)请求 *!/
export async function patchActivityRegist(entity: API.ActivityRegist_Patch): Promise<API.RespResult<any>> {
  return request(`/api/v1/activity-regist/${entity.id}`, {
    method: 'PATCH',
    data: entity,
  });
}

/!** 活动报名 删除请求 *!/
export async function deleteActivityRegist(bizId: API.EntityId): Promise<API.RespResult<any>> {
  return request(`/api/v1/activity-regist/${bizId}`, {
    method: 'DELETE',
  });
}

/!** 活动报名 批量删除请求 *!/
export async function deleteActivityRegists(bizIds: API.EntityId[]): Promise<API.RespResult<any>> {
  return request(`/api/v1/activity-regist`, {
    method: 'DELETE',
    data: {
      ids: bizIds,
    },
  });
}
*/


/** 活动 取消活动报名请求 */
export async function cancelActivityRegists(bizId: API.EntityId): Promise<API.RespResult<any>> {
  return request(`/api/v1/activity-regist/cancel/${bizId}`, {
    method: 'POST',
  });
}
